package request

import "time"

// DDoSFlowRequest DDoS流量数据请求结构
type DDoSFlowRequest struct {
	IP           string           `json:"ip"`
	Protocol     int              `json:"protocol"`
	FlowDuration int64            `json:"flowDuration"`
	FwdPackets   int              `json:"fwdPackets"`
	FlowType     string           `json:"flowType"`
	Time         time.Time        `json:"time"`
	Features     FeaturesRequest  `json:"features"`
}

// FeaturesRequest 流量特征请求结构
type FeaturesRequest struct {
	Protocol                int     `json:"protocol"`
	FlowDuration           int64   `json:"flowDuration"`
	TotalFwdPackets        int     `json:"totalFwdPackets"`
	TotalBackwardPackets   int     `json:"totalBackwardPackets"`
	FwdPacketsLengthTotal  float64 `json:"fwdPacketsLengthTotal"`
	FwdPacketLengthMax     float64 `json:"fwdPacketLengthMax"`
	FwdPacketLengthMin     float64 `json:"fwdPacketLengthMin"`
	FwdPacketLengthStd     float64 `json:"fwdPacketLengthStd"`
	BwdPacketLengthMax     float64 `json:"bwdPacketLengthMax"`
	BwdPacketLengthMin     float64 `json:"bwdPacketLengthMin"`
	FlowIATMean            float64 `json:"flowIATMean"`
	FlowIATMin             float64 `json:"flowIATMin"`
	BwdIATMean             float64 `json:"bwdIATMean"`
	BwdIATMin              float64 `json:"bwdIATMin"`
	FwdPSHFlags            int     `json:"fwdPSHFlags"`
	FwdHeaderLength        int     `json:"fwdHeaderLength"`
	BwdHeaderLength        int     `json:"bwdHeaderLength"`
	BwdPacketsPerSecond    float64 `json:"bwdPacketsPerSecond"`
	SYNFlagCount           int     `json:"synFlagCount"`
	URGFlagCount           int     `json:"urgFlagCount"`
	CWEFlagCount           int     `json:"cweFlagCount"`
	DownUpRatio            float64 `json:"downUpRatio"`
	InitFwdWinBytes        int     `json:"initFwdWinBytes"`
	InitBwdWinBytes        int     `json:"initBwdWinBytes"`
	ActiveMean             float64 `json:"activeMean"`
	ActiveStd              float64 `json:"activeStd"`
	IdleStd                float64 `json:"idleStd"`
}

// DDoSFlowsBatchRequest 批量DDoS流量数据请求结构
type DDoSFlowsBatchRequest struct {
	Flows []DDoSFlowRequest `json:"flows"`
}

